// api路由

import  Router  from '@koa/router';
import { 
  getUsers,
  getUserById,
  createUser
} from '../controller/userController.js';

export default function () {
  const router = new Router({ prefix: '/api' });

  // 用户相关路由
  router.get('/users', getUsers);
  router.get('/users/:id', getUserById);
  router.post('/users', createUser);

  // 其他API路由...
  
  return router;
}
